<form method="post" action="createEvent.php" onsubmit="return eventIsValid()" >
	<table>
		<thead>
			<tr>
				<th colspan="2">
					Create A New Event
				</th>	
			</tr>	
		</thead>	
		<tbody>
			<tr>
				<td>
					<b>Name: </b>
				</td>
				<td>	
					<input type="text" name="eventname" id="eventname" size="45" />
				</td>
			</tr>
			<tr>	
				<td>
					<b>Time: </b>
				</td>
				<td>	
					<input type="text" name="eventsdate" id="eventsdate" size="11" onchange="dateIsValid(this, 'mm/dd/yyyy')" onclick="wipe(this, 'mm/dd/yyyy')" onfocus="wipe(this, 'mm/dd/yyyy')" onBlur="dateIsValid(this, 'mm/dd/yyyy')" value="mm/dd/yyyy" />
					<img src="images/calendar.gif" width="20px" height="20px" align="top" id="esd_cal_trigger" style="cursor:pointer; display:inline"/>
					<input type="text" name="eventstime" id="eventstime" onBlur="timeIsValid(this, 'hh:mm a/pm')" value="hh:mm a/pm" onfocus="wipe(this, 'hh:mm a/pm')" size="11" style="display:inline" /><span id="to"> to </span><input type="text" name="eventetime" id="eventetime" onBlur="timeIsValid(this, 'hh:mm a/pm')" value="hh:mm a/pm" onfocus="wipe(this, 'hh:mm a/pm')" size="11" style="display:inline"/>
					<input type="text" name="eventedate" id="eventedate" size="11" onclick="wipe(this, 'mm/dd/yyyy')" onfocus="wipe(this, 'mm/dd/yyyy')" onBlur="dateIsValid(this, 'mm/dd/yyyy')" value="mm/dd/yyyy" style="display:inline" />
					<img src="images/calendar.gif" width="20px" height="20px" align="top" id="eed_cal_trigger" style="cursor:pointer;" />
					<input type="checkbox" id="allDay" name="allDay" onclick="toggleTargetR('allDay', new Array('eventstime', 'to', 'eventetime', 'eventedate', 'eed_cal_trigger'))" style="display:inline"/> all day
				</td>	
			</tr>
			<tr>
				<td>	
					<b>Location: </b>
				</td>
				<td>	
					<input type="text" name="eventloc" id="eventloc" size="45"/>
				</td>
			</tr>
			<tr>
				<td>	
					<b>Calendar: </b>
				</td>
				<td>	
					<select id="addeventcal" name="addeventcal">
						<?php
							$cal = new Zend_Gdata_Calendar($_SESSION['client']);
							//get the list of calendars 
							$calFeed = $cal->getCalendarListFeed();
							//display the list of all the user's calendars
							foreach($calFeed as $calendar) {
								echo "<option value='".$calendar->id."'>".$calendar->title->text."</option>";
							}
						?>
					</select>
				</td>
			</tr>
			<tr>
			<td valign=top>		
				<b>Description: </b>
			</td>
			<!-- <td>&nbsp;</td> -->
			<!-- </tr>
			<tr> -->
				<!-- <td>&nbsp;</td> -->
				<td colspan="2">	
					<textarea name="eventdesc" id="eventdesc" cols="60" rows="5"></textarea>
				</td>
			</tr>
			<tr>
				<td colspan="2" align="center">
					<input type="submit" value="Add Event" /> <input type="button" value="Cancel" onclick="cancel(resetAddEventForm)"/>
				</td>
			</tr>
		</tbody>
	</table>				
</form>
